#ifndef __SAMPLE_UTILS_H__
#define __SAMPLE_UTILS_H__
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <hi_gv.h>

#define RES_PATH  "./res/"

#define SBFONT_FILE  RES_PATH"font/ttf/simhei.ttf"
#define MBFONT_FILE  RES_PATH"font/ttf/simhei.ttf"

#define SCREEN_WIDTH_HD  1920
#define SCREEN_HEIGHT_HD 1080

#define SCREEN_WIDTH_SD  720
#define SCREEN_HEIGHT_SD 576

#define SCREEN_WIDTH_VGA  400
#define SCREEN_HEIGHT_VGA  768

#define INVALID_HANDLE 0x0

#define WIDGET_CHECK_RET(p, val)   if(!(p)) { printf("Error==%s,%d==\n", __FUNCTION__, __LINE__);return (val);}

#define HI_GV_Widget_SetMsgProcX(x1,x2,x3)  HI_GV_Widget_SetMsgProc(x1,x2,x3,HIGV_PROCORDER_BEFORE)

#define HIGV_CHECK(Function, Ret)  \
    if (Ret != HI_SUCCESS) {printf("[Func: %s, Line: %d] %s fail Ret(x):%x, Ret(d): %d\n", __FUNCTION__, __LINE__, Function, Ret, Ret);}

#endif
